package com.hiv.mapper.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("权限")
public class Permission implements Serializable {
    
    @ApiModelProperty("权限ID")
    private long id;
    @ApiModelProperty("上一级权限ID")
    private long parentId;
    @ApiModelProperty("权限名称")
    private String name;
    @ApiModelProperty("权限类型 0：页面，1：按钮")
    private int type;
    @ApiModelProperty("权限CODE")
    private String code;
    @ApiModelProperty("权限描述")
    private String desc;
    @ApiModelProperty("操作人")
    private String operator;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("+子项")
    private List<Permission> children;
}
